.class public Lcom/TwinBlade/PicturePassword/Preferences;
.super Landroid/preference/PreferenceActivity;
.source "SourceFile"

# interfaces
.implements Landroid/preference/Preference$OnPreferenceChangeListener;


# instance fields
.field private a:Landroid/content/Context;

.field private b:Landroid/content/SharedPreferences;

.field private c:Landroid/preference/Preference;

.field private d:Landroid/preference/Preference;

.field private e:Landroid/preference/Preference;


# direct methods
.method public constructor <init>()V
    .locals 0

    .prologue
    .line 15
    invoke-direct {p0}, Landroid/preference/PreferenceActivity;-><init>()V

    return-void
.end method

.method static synthetic a(Lcom/TwinBlade/PicturePassword/Preferences;)Landroid/content/SharedPreferences;
    .locals 1
    .parameter

    .prologue
    .line 18
    iget-object v0, p0, Lcom/TwinBlade/PicturePassword/Preferences;->b:Landroid/content/SharedPreferences;

    return-object v0
.end method

.method private a()V
    .locals 12

    .prologue
    const/4 v11, 0x1

    const/4 v10, 0x0

    .line 57
    const-string v0, "ThemeColor"

    invoke-virtual {p0, v0}, Lcom/TwinBlade/PicturePassword/Preferences;->findPreference(Ljava/lang/CharSequence;)Landroid/preference/Preference;

    move-result-object v0

    .line 58
    const-string v1, "InfoPanel"

    invoke-virtual {p0, v1}, Lcom/TwinBlade/PicturePassword/Preferences;->findPreference(Ljava/lang/CharSequence;)Landroid/preference/Preference;

    move-result-object v1

    .line 59
    const-string v2, "LockAfterWidgetLocker"

    invoke-virtual {p0, v2}, Lcom/TwinBlade/PicturePassword/Preferences;->findPreference(Ljava/lang/CharSequence;)Landroid/preference/Preference;

    move-result-object v2

    .line 60
    const-string v3, "MusicControl"

    invoke-virtual {p0, v3}, Lcom/TwinBlade/PicturePassword/Preferences;->findPreference(Ljava/lang/CharSequence;)Landroid/preference/Preference;

    move-result-object v3

    .line 61
    const-string v4, "OwnersInfo"

    invoke-virtual {p0, v4}, Lcom/TwinBlade/PicturePassword/Preferences;->findPreference(Ljava/lang/CharSequence;)Landroid/preference/Preference;

    move-result-object v4

    .line 63
    invoke-static {p0}, Lcom/TwinBlade/PicturePassword/bd;->a(Landroid/content/Context;)Z

    move-result v5

    if-nez v5, :cond_0

    .line 64
    iget-object v5, p0, Lcom/TwinBlade/PicturePassword/Preferences;->b:Landroid/content/SharedPreferences;

    invoke-interface {v5}, Landroid/content/SharedPreferences;->edit()Landroid/content/SharedPreferences$Editor;

    move-result-object v5

    const-string v6, "LockDelayMinute"

    invoke-interface {v5, v6, v10}, Landroid/content/SharedPreferences$Editor;->putInt(Ljava/lang/String;I)Landroid/content/SharedPreferences$Editor;

    move-result-object v5

    invoke-interface {v5}, Landroid/content/SharedPreferences$Editor;->commit()Z

    .line 65
    iget-object v5, p0, Lcom/TwinBlade/PicturePassword/Preferences;->b:Landroid/content/SharedPreferences;

    invoke-interface {v5}, Landroid/content/SharedPreferences;->edit()Landroid/content/SharedPreferences$Editor;

    move-result-object v5

    const-string v6, "LockDelaySecond"

    invoke-interface {v5, v6, v10}, Landroid/content/SharedPreferences$Editor;->putInt(Ljava/lang/String;I)Landroid/content/SharedPreferences$Editor;

    move-result-object v5

    invoke-interface {v5}, Landroid/content/SharedPreferences$Editor;->commit()Z

    .line 66
    iget-object v5, p0, Lcom/TwinBlade/PicturePassword/Preferences;->b:Landroid/content/SharedPreferences;

    invoke-interface {v5}, Landroid/content/SharedPreferences;->edit()Landroid/content/SharedPreferences$Editor;

    move-result-object v5

    const-string v6, "ThemeColor"

    const/16 v7, 0x39

    const/16 v8, 0x92

    const/16 v9, 0xb5

    invoke-static {v7, v8, v9}, Landroid/graphics/Color;->rgb(III)I

    move-result v7

    invoke-interface {v5, v6, v7}, Landroid/content/SharedPreferences$Editor;->putInt(Ljava/lang/String;I)Landroid/content/SharedPreferences$Editor;

    move-result-object v5

    invoke-interface {v5}, Landroid/content/SharedPreferences$Editor;->commit()Z

    .line 67
    iget-object v5, p0, Lcom/TwinBlade/PicturePassword/Preferences;->b:Landroid/content/SharedPreferences;

    invoke-interface {v5}, Landroid/content/SharedPreferences;->edit()Landroid/content/SharedPreferences$Editor;

    move-result-object v5

    const-string v6, "InfoPanel"

    invoke-interface {v5, v6, v10}, Landroid/content/SharedPreferences$Editor;->putBoolean(Ljava/lang/String;Z)Landroid/content/SharedPreferences$Editor;

    move-result-object v5

    invoke-interface {v5}, Landroid/content/SharedPreferences$Editor;->commit()Z

    .line 68
    iget-object v5, p0, Lcom/TwinBlade/PicturePassword/Preferences;->b:Landroid/content/SharedPreferences;

    invoke-interface {v5}, Landroid/content/SharedPreferences;->edit()Landroid/content/SharedPreferences$Editor;

    move-result-object v5

    const-string v6, "LockAfterWidgetLocker"

    invoke-interface {v5, v6, v10}, Landroid/content/SharedPreferences$Editor;->putBoolean(Ljava/lang/String;Z)Landroid/content/SharedPreferences$Editor;

    move-result-object v5

    invoke-interface {v5}, Landroid/content/SharedPreferences$Editor;->commit()Z

    .line 69
    iget-object v5, p0, Lcom/TwinBlade/PicturePassword/Preferences;->b:Landroid/content/SharedPreferences;

    invoke-interface {v5}, Landroid/content/SharedPreferences;->edit()Landroid/content/SharedPreferences$Editor;

    move-result-object v5

    const-string v6, "MusicControl"

    invoke-interface {v5, v6, v10}, Landroid/content/SharedPreferences$Editor;->putBoolean(Ljava/lang/String;Z)Landroid/content/SharedPreferences$Editor;

    move-result-object v5

    invoke-interface {v5}, Landroid/content/SharedPreferences$Editor;->commit()Z

    .line 70
    iget-object v5, p0, Lcom/TwinBlade/PicturePassword/Preferences;->b:Landroid/content/SharedPreferences;

    invoke-interface {v5}, Landroid/content/SharedPreferences;->edit()Landroid/content/SharedPreferences$Editor;

    move-result-object v5

    const-string v6, "OwnersInfo"

    const-string v7, ""

    invoke-interface {v5, v6, v7}, Landroid/content/SharedPreferences$Editor;->putString(Ljava/lang/String;Ljava/lang/String;)Landroid/content/SharedPreferences$Editor;

    move-result-object v5

    invoke-interface {v5}, Landroid/content/SharedPreferences$Editor;->commit()Z

    .line 72
    invoke-virtual {v0, v10}, Landroid/preference/Preference;->setEnabled(Z)V

    .line 73
    iget-object v0, p0, Lcom/TwinBlade/PicturePassword/Preferences;->d:Landroid/preference/Preference;

    invoke-virtual {v0, v10}, Landroid/preference/Preference;->setEnabled(Z)V

    .line 74
    invoke-virtual {v1, v10}, Landroid/preference/Preference;->setEnabled(Z)V

    .line 75
    invoke-virtual {v2, v10}, Landroid/preference/Preference;->setEnabled(Z)V

    .line 76
    invoke-virtual {v3, v10}, Landroid/preference/Preference;->setEnabled(Z)V

    .line 77
    invoke-virtual {v4, v10}, Landroid/preference/Preference;->setEnabled(Z)V

    .line 79
    iget-object v0, p0, Lcom/TwinBlade/PicturePassword/Preferences;->b:Landroid/content/SharedPreferences;

    invoke-interface {v0}, Landroid/content/SharedPreferences;->edit()Landroid/content/SharedPreferences$Editor;

    move-result-object v0

    const-string v1, "FourthGestureData"

    const-string v2, "0"

    invoke-interface {v0, v1, v2}, Landroid/content/SharedPreferences$Editor;->putString(Ljava/lang/String;Ljava/lang/String;)Landroid/content/SharedPreferences$Editor;

    move-result-object v0

    invoke-interface {v0}, Landroid/content/SharedPreferences$Editor;->commit()Z

    .line 80
    iget-object v0, p0, Lcom/TwinBlade/PicturePassword/Preferences;->b:Landroid/content/SharedPreferences;

    invoke-interface {v0}, Landroid/content/SharedPreferences;->edit()Landroid/content/SharedPreferences$Editor;

    move-result-object v0

    const-string v1, "FifthGestureData"

    const-string v2, "0"

    invoke-interface {v0, v1, v2}, Landroid/content/SharedPreferences$Editor;->putString(Ljava/lang/String;Ljava/lang/String;)Landroid/content/SharedPreferences$Editor;

    move-result-object v0

    invoke-interface {v0}, Landroid/content/SharedPreferences$Editor;->commit()Z

    .line 81
    iget-object v0, p0, Lcom/TwinBlade/PicturePassword/Preferences;->b:Landroid/content/SharedPreferences;

    invoke-interface {v0}, Landroid/content/SharedPreferences;->edit()Landroid/content/SharedPreferences$Editor;

    move-result-object v0

    const-string v1, "FourthGestureType"

    const-string v2, "none"

    invoke-interface {v0, v1, v2}, Landroid/content/SharedPreferences$Editor;->putString(Ljava/lang/String;Ljava/lang/String;)Landroid/content/SharedPreferences$Editor;

    move-result-object v0

    invoke-interface {v0}, Landroid/content/SharedPreferences$Editor;->commit()Z

    .line 82
    iget-object v0, p0, Lcom/TwinBlade/PicturePassword/Preferences;->b:Landroid/content/SharedPreferences;

    invoke-interface {v0}, Landroid/content/SharedPreferences;->edit()Landroid/content/SharedPreferences$Editor;

    move-result-object v0

    const-string v1, "FifthGestureType"

    const-string v2, "none"

    invoke-interface {v0, v1, v2}, Landroid/content/SharedPreferences$Editor;->putString(Ljava/lang/String;Ljava/lang/String;)Landroid/content/SharedPreferences$Editor;

    move-result-object v0

    invoke-interface {v0}, Landroid/content/SharedPreferences$Editor;->commit()Z

    .line 84
    iget-object v0, p0, Lcom/TwinBlade/PicturePassword/Preferences;->e:Landroid/preference/Preference;

    const v1, 0x7f09001f

    invoke-virtual {p0, v1}, Lcom/TwinBlade/PicturePassword/Preferences;->getString(I)Ljava/lang/String;

    move-result-object v1

    invoke-virtual {v0, v1}, Landroid/preference/Preference;->setTitle(Ljava/lang/CharSequence;)V

    .line 85
    iget-object v0, p0, Lcom/TwinBlade/PicturePassword/Preferences;->e:Landroid/preference/Preference;

    const-string v1, ""

    invoke-virtual {v0, v1}, Landroid/preference/Preference;->setSummary(Ljava/lang/CharSequence;)V

    .line 86
    iget-object v0, p0, Lcom/TwinBlade/PicturePassword/Preferences;->e:Landroid/preference/Preference;

    invoke-virtual {v0, v11}, Landroid/preference/Preference;->setEnabled(Z)V

    .line 104
    :goto_0
    return-void

    .line 88
    :cond_0
    invoke-virtual {v0, v11}, Landroid/preference/Preference;->setEnabled(Z)V

    .line 89
    iget-object v0, p0, Lcom/TwinBlade/PicturePassword/Preferences;->d:Landroid/preference/Preference;

    invoke-virtual {v0, v11}, Landroid/preference/Preference;->setEnabled(Z)V

    .line 90
    invoke-virtual {v1, v11}, Landroid/preference/Preference;->setEnabled(Z)V

    .line 91
    invoke-virtual {v2, v11}, Landroid/preference/Preference;->setEnabled(Z)V

    .line 92
    invoke-virtual {v3, v11}, Landroid/preference/Preference;->setEnabled(Z)V

    .line 93
    invoke-virtual {v4, v11}, Landroid/preference/Preference;->setEnabled(Z)V

    .line 95
    iget-object v0, p0, Lcom/TwinBlade/PicturePassword/Preferences;->e:Landroid/preference/Preference;

    const v1, 0x7f09001d

    invoke-virtual {p0, v1}, Lcom/TwinBlade/PicturePassword/Preferences;->getString(I)Ljava/lang/String;

    move-result-object v1

    invoke-virtual {v0, v1}, Landroid/preference/Preference;->setTitle(Ljava/lang/CharSequence;)V

    .line 96
    const v0, 0x7f09001e

    invoke-virtual {p0, v0}, Lcom/TwinBlade/PicturePassword/Preferences;->getString(I)Ljava/lang/String;

    move-result-object v0

    .line 97
    iget-object v1, p0, Lcom/TwinBlade/PicturePassword/Preferences;->b:Landroid/content/SharedPreferences;

    const-string v2, "PayPalKey"

    const-string v3, "-1"

    invoke-interface {v1, v2, v3}, Landroid/content/SharedPreferences;->getString(Ljava/lang/String;Ljava/lang/String;)Ljava/lang/String;

    move-result-object v1

    const-string v2, "-1"

    invoke-virtual {v1, v2}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z

    move-result v1

    if-nez v1, :cond_1

    .line 98
    new-instance v1, Ljava/lang/StringBuilder;

    invoke-static {v0}, Ljava/lang/String;->valueOf(Ljava/lang/Object;)Ljava/lang/String;

    move-result-object v0

    invoke-direct {v1, v0}, Ljava/lang/StringBuilder;-><init>(Ljava/lang/String;)V

    const-string v0, ". Press to copy the PayPal Serial Key"

    invoke-virtual {v1, v0}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v0

    invoke-virtual {v0}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v0

    .line 102
    :goto_1
    iget-object v1, p0, Lcom/TwinBlade/PicturePassword/Preferences;->e:Landroid/preference/Preference;

    invoke-virtual {v1, v0}, Landroid/preference/Preference;->setSummary(Ljava/lang/CharSequence;)V

    goto :goto_0

    .line 100
    :cond_1
    iget-object v1, p0, Lcom/TwinBlade/PicturePassword/Preferences;->e:Landroid/preference/Preference;

    invoke-virtual {v1, v10}, Landroid/preference/Preference;->setEnabled(Z)V

    goto :goto_1
.end method

.method static synthetic b(Lcom/TwinBlade/PicturePassword/Preferences;)Landroid/content/Context;
    .locals 1
    .parameter

    .prologue
    .line 17
    iget-object v0, p0, Lcom/TwinBlade/PicturePassword/Preferences;->a:Landroid/content/Context;

    return-object v0
.end method


# virtual methods
.method protected onActivityResult(IILandroid/content/Intent;)V
    .locals 2
    .parameter
    .parameter
    .parameter

    .prologue
    .line 126
    invoke-super {p0, p1, p2, p3}, Landroid/preference/PreferenceActivity;->onActivityResult(IILandroid/content/Intent;)V

    .line 127
    packed-switch p1, :pswitch_data_0

    .line 136
    :goto_0
    return-void

    .line 129
    :pswitch_0
    const/4 v0, -0x1

    if-ne p2, v0, :cond_0

    .line 130
    iget-object v0, p0, Lcom/TwinBlade/PicturePassword/Preferences;->c:Landroid/preference/Preference;

    const/4 v1, 0x1

    invoke-virtual {v0, v1}, Landroid/preference/Preference;->setEnabled(Z)V

    goto :goto_0

    .line 132
    :cond_0
    iget-object v0, p0, Lcom/TwinBlade/PicturePassword/Preferences;->c:Landroid/preference/Preference;

    const/4 v1, 0x0

    invoke-virtual {v0, v1}, Landroid/preference/Preference;->setEnabled(Z)V

    goto :goto_0

    .line 127
    :pswitch_data_0
    .packed-switch 0x1
        :pswitch_0
    .end packed-switch
.end method

.method public onCreate(Landroid/os/Bundle;)V
    .locals 2
    .parameter

    .prologue
    .line 24
    invoke-static {p0}, Lcom/TwinBlade/PicturePassword/Utilities;->e(Landroid/content/Context;)V

    .line 25
    invoke-super {p0, p1}, Landroid/preference/PreferenceActivity;->onCreate(Landroid/os/Bundle;)V

    .line 26
    const v0, 0x7f060001

    invoke-virtual {p0, v0}, Lcom/TwinBlade/PicturePassword/Preferences;->addPreferencesFromResource(I)V

    .line 28
    invoke-static {p0}, Landroid/preference/PreferenceManager;->getDefaultSharedPreferences(Landroid/content/Context;)Landroid/content/SharedPreferences;

    move-result-object v0

    iput-object v0, p0, Lcom/TwinBlade/PicturePassword/Preferences;->b:Landroid/content/SharedPreferences;

    .line 29
    iput-object p0, p0, Lcom/TwinBlade/PicturePassword/Preferences;->a:Landroid/content/Context;

    .line 31
    const-string v0, "ThemeColorReset"

    invoke-virtual {p0, v0}, Lcom/TwinBlade/PicturePassword/Preferences;->findPreference(Ljava/lang/CharSequence;)Landroid/preference/Preference;

    move-result-object v0

    iput-object v0, p0, Lcom/TwinBlade/PicturePassword/Preferences;->d:Landroid/preference/Preference;

    .line 32
    iget-object v0, p0, Lcom/TwinBlade/PicturePassword/Preferences;->d:Landroid/preference/Preference;

    new-instance v1, Lcom/TwinBlade/PicturePassword/bf;

    invoke-direct {v1, p0}, Lcom/TwinBlade/PicturePassword/bf;-><init>(Lcom/TwinBlade/PicturePassword/Preferences;)V

    invoke-virtual {v0, v1}, Landroid/preference/Preference;->setOnPreferenceClickListener(Landroid/preference/Preference$OnPreferenceClickListener;)V

    .line 39
    const-string v0, "NavBarMode"

    invoke-virtual {p0, v0}, Lcom/TwinBlade/PicturePassword/Preferences;->findPreference(Ljava/lang/CharSequence;)Landroid/preference/Preference;

    move-result-object v0

    iput-object v0, p0, Lcom/TwinBlade/PicturePassword/Preferences;->c:Landroid/preference/Preference;

    .line 40
    iget-object v0, p0, Lcom/TwinBlade/PicturePassword/Preferences;->c:Landroid/preference/Preference;

    invoke-virtual {v0, p0}, Landroid/preference/Preference;->setOnPreferenceChangeListener(Landroid/preference/Preference$OnPreferenceChangeListener;)V

    .line 42
    const-string v0, "PlusKey"

    invoke-virtual {p0, v0}, Lcom/TwinBlade/PicturePassword/Preferences;->findPreference(Ljava/lang/CharSequence;)Landroid/preference/Preference;

    move-result-object v0

    iput-object v0, p0, Lcom/TwinBlade/PicturePassword/Preferences;->e:Landroid/preference/Preference;

    .line 43
    iget-object v0, p0, Lcom/TwinBlade/PicturePassword/Preferences;->e:Landroid/preference/Preference;

    new-instance v1, Lcom/TwinBlade/PicturePassword/bg;

    invoke-direct {v1, p0}, Lcom/TwinBlade/PicturePassword/bg;-><init>(Lcom/TwinBlade/PicturePassword/Preferences;)V

    invoke-virtual {v0, v1}, Landroid/preference/Preference;->setOnPreferenceClickListener(Landroid/preference/Preference$OnPreferenceClickListener;)V

    .line 54
    return-void
.end method

.method public onPreferenceChange(Landroid/preference/Preference;Ljava/lang/Object;)Z
    .locals 4
    .parameter
    .parameter

    .prologue
    const/4 v1, 0x0

    const/4 v0, 0x1

    .line 108
    iget-object v2, p0, Lcom/TwinBlade/PicturePassword/Preferences;->c:Landroid/preference/Preference;

    invoke-virtual {p1, v2}, Ljava/lang/Object;->equals(Ljava/lang/Object;)Z

    move-result v2

    if-eqz v2, :cond_1

    .line 110
    check-cast p2, Ljava/lang/Boolean;

    invoke-virtual {p2}, Ljava/lang/Boolean;->booleanValue()Z

    move-result v2

    if-eqz v2, :cond_0

    .line 111
    new-instance v1, Landroid/content/Intent;

    const-class v2, Lcom/TwinBlade/PicturePassword/Root;

    invoke-direct {v1, p0, v2}, Landroid/content/Intent;-><init>(Landroid/content/Context;Ljava/lang/Class;)V

    .line 112
    const-string v2, "Install"

    invoke-virtual {v1, v2, v0}, Landroid/content/Intent;->putExtra(Ljava/lang/String;Z)Landroid/content/Intent;

    .line 113
    invoke-virtual {p0, v1, v0}, Lcom/TwinBlade/PicturePassword/Preferences;->startActivityForResult(Landroid/content/Intent;I)V

    .line 121
    :goto_0
    return v0

    .line 115
    :cond_0
    new-instance v2, Landroid/content/Intent;

    const-class v3, Lcom/TwinBlade/PicturePassword/Root;

    invoke-direct {v2, p0, v3}, Landroid/content/Intent;-><init>(Landroid/content/Context;Ljava/lang/Class;)V

    .line 116
    const-string v3, "Install"

    invoke-virtual {v2, v3, v1}, Landroid/content/Intent;->putExtra(Ljava/lang/String;Z)Landroid/content/Intent;

    .line 117
    invoke-virtual {p0, v2, v0}, Lcom/TwinBlade/PicturePassword/Preferences;->startActivityForResult(Landroid/content/Intent;I)V

    goto :goto_0

    :cond_1
    move v0, v1

    .line 121
    goto :goto_0
.end method

.method public onResume()V
    .locals 0

    .prologue
    .line 140
    invoke-super {p0}, Landroid/preference/PreferenceActivity;->onResume()V

    .line 141
    invoke-direct {p0}, Lcom/TwinBlade/PicturePassword/Preferences;->a()V

    .line 142
    return-void
.end method
